
package guiprototype;

import java.util.Map;
import java.util.HashMap;

import guiprototype.Area;


/** 
 * Holds all information about the entire world!
 */
public class World
{
    Map<String,Area> countries;

    public World()
    {
        countries = new HashMap<String,Area>();

        createTestWorld();
    }

    /** For initial development, we use a simple artificial map */
    void createTestWorld()
    {
    	// TODO: Build from map file!
    	
        Area a = new Area();
        a.name = "Norge";
        a.position.x = 100;
        a.position.y = 100;
        
        Area b = new Area();
        b.name = "Sverige";
        b.position.x = 400;
        b.position.y = 100;
        
        Area c = new Area();
        c.name = "Danmark";
        c.position.x = 100;
        c.position.y = 400;
        
        Area d = new Area();
        d.name = "Tyskland";
        d.position.x = 400;
        d.position.y = 400;
        
        countries.put(a.name, a);
        countries.put(b.name, b);
        countries.put(c.name, c);
        countries.put(d.name, d);

        // Circular borders: a - b - c - d - a
        a.neighbours.put(b.name, b);
        b.neighbours.put(a.name, a);
        
        b.neighbours.put(c.name, c);
        c.neighbours.put(b.name, b);
        
        c.neighbours.put(d.name, d);
        d.neighbours.put(c.name, c);
        
        d.neighbours.put(a.name, a);
        a.neighbours.put(d.name, d);
    }
}

